//
// C++ Interface: container
//
// Description: 
//
//
// Author: Os3 s.r.l. <xgui@os3.it>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifdef SWIGPYTHON
	%typemap(out) xgui::Widget * { $result = XGUIPyObjectCreate($1, false); }
#endif

namespace xgui
{   
    %feature("docstring","**DESCRIPTION**\n\nderives from :class:`xgui.WidgetClass`") ContainerClass;
	struct ContainerClass : public xgui::WidgetClass
	{
		ContainerClass();
		std::string const &className();
		bool isContainer();

		virtual bool canContain(xgui::ClassInfo * c);
		virtual bool canBeContainedIn(xgui::ClassInfo * c);
	};
    %feature("docstring","derives from :class:`xgui.Widget` \n\n**PROPERTIES**\n\nnone.\n\n**EVENTS**\n\nnone.\n\n**METHODS**\n\n") Container;
	class Container : public xgui::Widget
	{
		protected:
			Container( xgui::Container * parent, xgui::ClassInfo * cinfo, xguimpl::Widget * widget = 0);
			virtual ~Container();

		public:
		    %feature("docstring","returns the child identified by <child_name>, or NULL if no child is found.The child is searched in the container and recursively in the children of all the contained containers.\n\n*C++*::\n\n xgui::Widget * findChild(std::string const &child_name);\n\n") findChild;
			xgui::Widget * findChild(std::string const &child_name);
			%feature("docstring","returns the child identified by <child_name>, or NULL if no child is found.No recursive search is performed, just the direct children of the container are searched.\n\n*C++*::\n\n xgui::Widget * findDirectChild(std::string const &child_name);\n\n") findDirectChild;
			xgui::Widget * findDirectChild(std::string const &child_name);
			%feature("docstring","returns the child widget at the specified position in the contained children list, or NULL if there is no child at the specified position.\n\n*C++*::\n\n xgui::Widget * getChild(int pos);\n\n") getChild;
			xgui::Widget * getChild(int pos);
			unsigned int size();
	};
}

%clear xgui::Widget *;

